import request from "@/utils/http/request";
import {FormVO} from "@/types";

export const login = async (data: any) => {
    return await request({
        url: "/login",
        method: "post",
        data,
    });
};

// 更新工作流的表单定义
export const updateFormApi = async (data: FormVO) => {
    return await request({
        url: '/bpm/form/update',
        method: "post",
        data: data
    })
}

// 删除工作流的表单定义
export const deleteFormApi = async (id: number) => {
    return await request({
        url: '/bpm/form/delete?id=' + id,
        method: "post",
    })
}

// 获得工作流的表单定义分页
export const getFormPageApi = async (params: any) => {
    return await request({
        url: '/bpm/form/page',
        method: "get",
        params
    })
}

// 获得动态表单的精简列表
export const getSimpleFormsApi = async () => {
    return await request({
        url: '/bpm/form/list-all-simple',
        method: "get",
    })
}